# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ToolResults.V1beta3.Model.NonSdkApiInsight do
  @moduledoc """
  Non-SDK API insights (to address debugging solutions).

  ## Attributes

  *   `exampleTraceMessages` (*type:* `list(String.t)`, *default:* `nil`) - Optional sample stack traces, for which this insight applies (there should be at least one).
  *   `matcherId` (*type:* `String.t`, *default:* `nil`) - A unique ID, to be used for determining the effectiveness of this particular insight in the context of a matcher. (required)
  *   `pendingGoogleUpdateInsight` (*type:* `GoogleApi.ToolResults.V1beta3.Model.PendingGoogleUpdateInsight.t`, *default:* `nil`) - An insight indicating that the hidden API usage originates from a Google-provided library.
  *   `upgradeInsight` (*type:* `GoogleApi.ToolResults.V1beta3.Model.UpgradeInsight.t`, *default:* `nil`) - An insight indicating that the hidden API usage originates from the use of a library that needs to be upgraded.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :exampleTraceMessages => list(String.t()) | nil,
          :matcherId => String.t() | nil,
          :pendingGoogleUpdateInsight =>
            GoogleApi.ToolResults.V1beta3.Model.PendingGoogleUpdateInsight.t() | nil,
          :upgradeInsight => GoogleApi.ToolResults.V1beta3.Model.UpgradeInsight.t() | nil
        }

  field(:exampleTraceMessages, type: :list)
  field(:matcherId)

  field(:pendingGoogleUpdateInsight,
    as: GoogleApi.ToolResults.V1beta3.Model.PendingGoogleUpdateInsight
  )

  field(:upgradeInsight, as: GoogleApi.ToolResults.V1beta3.Model.UpgradeInsight)
end

defimpl Poison.Decoder, for: GoogleApi.ToolResults.V1beta3.Model.NonSdkApiInsight do
  def decode(value, options) do
    GoogleApi.ToolResults.V1beta3.Model.NonSdkApiInsight.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.ToolResults.V1beta3.Model.NonSdkApiInsight do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
